package com.example.pickupclosefirstdemo.interflowactivity;

import android.os.Bundle;

import com.example.pickupclosefirstdemo.R;
import com.example.pickupclosefirstdemo.base.AppManager;
import com.example.pickupclosefirstdemo.base.BaseActivity;
import com.example.pickupclosefirstdemo.databinding.ActivityInterflowSecondBinding;
import com.example.pickupclosefirstdemo.fragment.interflowfirstfragment.InterflowFirstFragment;

public class InterflowSecondActivity extends BaseActivity<ActivityInterflowSecondBinding> {

    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_interflow_second;
    }

    @Override
    public void initView() {
        binding.setActivity(this);
    }

    @Override
    public void initData() {
        /**
         * frameLayout
         */
        InterflowFirstFragment fragment = new InterflowFirstFragment();
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.flModel, fragment, fragment.getClass().getSimpleName())
                .addToBackStack(fragment.getClass().getSimpleName())
                .commitAllowingStateLoss();
        AppManager.getAppManager().addFragment(fragment);
    }
}
